 GVBox Help Contents

The Contents lists Help topics available for GVBox.  Use the scroll bar to see entries not currently visible in the Help window.

To learn how to use Help, press F1 or choose Using Help from the Help menu

GVBox

Error Messages

Events

File Types

Properties

Requirements for Using GVBox

Registering


 GVBox: File Types

Graphics Viewer  OCX will read ART, BMP, CUT, DIB, EMF, GEM, GIF, HRZ, IFF, IMG, JPG, LBM, MAC, MSP, PCX, PIC, PNG, RAS, RLE, TGA, TIF, WMF, and WPG file formats.

ART	PFS First Publisher

BMP	Microsoft Windows and OS2 bitmaps

CUT	Dr. Halo

DIB	Microsoft Windows Device Independent Bitmaps

EMF	Windows Enhanced Meta-files

GEM	GEM Raster files (Digital Research)

GIF	CompuServe Graphics Interchange Format

HRZ	Slow Scan Television

IFF	Interchange File Format (Amiga Electronic Arts Deluxe Paint)

IMG	GEM Raster files (Digital Research)

JPG	Joint Photographics Experts Group

LBM	Interchange File Format (Amiga Electronic Arts Deluxe Paint)

MAC	Macintosh Paint

MSP	Microsoft Paint

PCX	ZSoft PC Paintbrush

PIC	Pictor PC Paint

PNG	CompuServe Portable Network Graphics

RAS	Sun Raster files

RLE	Run-length Encoded BMP files

TGA	Targa TrueVision Files

TIF	Tagged Image File Format (PC or Mac)

WMF	Windows Meta-files

WPG	Word Perfect Graphics


  GVBox: Properties

In addition to standard control properties, the GVBox control has the following extra properties:

About 	JPEGDither

Autosize 	Picture

bmph	PrintHDC

bmpw	PrintX

DCTMethod 	PrintY

Dither 	PrintZoom

FancyUpsampling 	Thumbnail

FileName 	TwoPassQuantize

GVOpenPicture 	Zoom

hDC

If you change any of the standard properties at run time, you should invoke the Refresh method.


  GVBox: Errors

GVBOX.OCX check for errors; however, several graphics formats have variations in their file structures and may not be readable by Graphics Viewer.  Some files may even cause the OCX to lock-up.  If you experience any difficulty reading files with GVBOX.OCX, please contact me.

The following errors may be generated by GVBOX.OCX:

20000	Unknown error occurred

20001	Could not open file - can be caused by locked files.

20002	Error allocating memory

20003	Error reading file

20004	Memory error - bad copy

20005	Could not create DIB handle

20006	Error allocating huge memory

20007	Bad code in GIF file

20008	Bad first code in GIF file

20009	Bad bit in GIF file

20010	Bad header in file

20011	Could not find bitmap in file - Some WPG files do not contain bitmaps.

20012	Could not create palette

20013	File type not supported

20014	Could not load GVJPEG32.DLL - check to make sure it is in the WINDOWS\SYSTEM directory

20015	Unsupported TIFF compression method

20016	Could not load GVPNG32.DLL - check to make sure it is in the WINDOWS\SYSTEM directory


  GVBox Properties: About

About tells you the version number of the control and how to contact the author.


  GVBox Properties: bmpw

bmpw returns the width of the bitmap in pixels.


  GVBox Properties: bmph

bmph returns the height of the bitmap in pixels.


  GVBox Properties: Autosize

Auotsize can be set to the following values:

0 - Off

1 - Fit to Bitmap

2 - Fit Horizontally

3 - Fit Vertically

When set to 0 (Off), the size of the control is not changed and the bitmap is displayed in the upper - left corner and sized depending on the Zoom property.

When set to 1 (Fit to Bitmap), the size of the control is set to the size of the bitmap and increased depending on the Zoom property.

When set to 2 (Fit Horizontally), the bitmap is stretched to match the width of the control and the height is set to maintain the aspect ratio.

When set to 3 (Fit Vertically), the bitmap is stretched to match the height of the control and the width is set to maintain the aspect ratio.

The Zoom property has no effect when Autosize is set to either 2 or 3.

Non-placeable metafiles are displayed to fit the current size of the control.  If you want to display a non-placeable metafile at a certain size, set the Width and Height properties before setting the FileName property.

Note:  The BackColor property will only have affect when AutoSize is set to 0.


 GVBox Properties: DCTMethod

DCTMethod can be set to the following values:

0 - Slow Integer

1 - Fast Integer

2 - Floating Point

DCTMethod only applies to JPEG files.  The default is Fast Integer and will usually give a reasonably good quality picture.


  GVBox Properties: Dither

Dither can be set to the following values:

0 - No Dithering

1 - Dither Always

2 - Dither extra colors

Dither Extra Colors is the default.  The default is 0 - No Dithering.  Windows 95 dithers 24 bit images down to 256 colors much faster than Windows 3.1.


  GVBox Properties: FancyUpsampling

FancyUpsampling applies to JPEG files and when set to TRUE provides a higher quality image at the expense of speed.


  GVBox Properties: FileName

FileName is the name of the file you want to load into the GVBox control.  Setting FileName to NULL (“”) will clear the picture from the control.

The FileName property can be set directly or by setting the GVOpenPicture property to TRUE and selecting a file from the common dialog box.


  GVBox Properties: GVOpenPicture

Setting GVOpenPicture to TRUE brings up a common dialog box for selecting files to load into the GVBox control.


  GVBox Properties: hDC

hDC is the device context for the GVBox control.  This property can be used for Windows drawing and text functions to draw graphics or display text over graphic images.  Graphics statements should be placed in the GVBox_Paint event so that they are updated whenever the control is re-drawn.


  GVBox Properties: JPEGDither

JPEGDither can be set to the following values:

0 - None

1 - Ordered

2 - Floyd-Steinberg

The default is 1 (Ordered).  0 (None) is faster; however, the quality is usually not very good.  2 (Floyd-Steinberg) gives higher quality but is much slower.


  GVBox Properties: Picture

The Picture property can be used by SavePicture to save the image in BMP format or to assign to another control (i.e. Picture1.Picture = GVBox1.Picture).  You can not save EMF or WMF files with SavePicture unless you have the Thumbnail property set.  The Picture property is read only.

The Picture property also will not return an Enhanced Windows Metafile (EMF).


  GVBox Properties: PrintHDC

Setting PrintHDC to Printer.HDC prints the image to the Printer Object based on the PrintX, PrintY, and PrintZoom properties (the Printer Object should already be started before setting PrintHDC).  You can also pass the HDC of any control to PrintHDC.


  GVBox Properties: PrintX

PrintX is the X coordinate where you want the image placed.  This value is always in Pixels.


  GVBox Properties: PrintY

PrintY is the Y coordinate where you want the image placed.  This value is always in Pixels.


  GVBox Properties: PrintZoom

PrintZoom is the percentage by which to size the printed picture. PrintZoom can be set to any value greater than 0.  Values less than 1 will shrink the image and values greater than 1 will increase the size of the image.


  GVBox Properties: Thumbnail

Thumbnail images can be created by setting the Thumbnail value to any value greater than zero.  The value represents the size you want in pixels.  Thumbnail creates a small preview image of the picture.  To turn off thumbnail viewing, set Thumbnail to 0.


  GVBox Properties: TwoPassQuantize

TwoPassQuantize applies to JPEG images and when set to TRUE provides a higher quality image at the expense of speed.


GVBox Properties: PrintZoom
  GVBox Properties: Zoom

Zoom increases the size of the picture up to 400%. Zoom can be set to any value greater than 0.  Values less than 1 will shrink the image and values greater than 1 will increase the size of the image.


 GVBox: Registering

To get a version of GVBOX.OCX without the nag window, you can register Graphics Viewer OCX online via CompuServe (GO SWREG ID #10778) or by contacting me at:

Compuserve 71742,1451

E-Mail - joe_oliphant@csufresno.edu

GVBOX.OCX is intended to be registered to individuals.  Any company wishing to register GVBOX.OCX would need to register one copy for each person using it.  Registered users can freely distribute GVBOX.OCX in any application.

If you are already a registered user of Graphics Viewer - VBX, you can register for the upgrade (GO SWREG ID#10779) but you must be registered under YOUR name, not a company name or a friend’s name.


 GVBox: Events

In addition to standard control events, the GVBox control has the following events:

Paint	Resize


 GVBox Events: Paint

The Paint event is fired every time the control is redrawn.  If you want to use the hDC property to draw on the control, statements should be placed in the GVBox_Paint event.


 GVBox Events: Resize

The Resize event is fired whenever the control is resized either through changes to the Width or Height properties or when loading a file when AutoSize is TRUE.


 JPEG Files

GVBOX.OCX requires GVJPEG32.DLL to read JPEG files.  GVJPEG32.DLL should be placed in the WINDOWS\SYSTEM directory.

JPEG files take longer to display than other file types.  The DCTMethod, FancyUpsampling, TwoPassQuantize, and JPEGDither properties control the speed and quality of JPEG images.


 PNG Files

GVBOX.OCX requires GVPNG32.DLL to read PNG files.  GVPNG32.DLL should be placed in the WINDOWS\SYSTEM directory.


 TIFF Files

GVBOX.OCX will read uncompressed and PackBits compressed TIFF files by itself.  GVBOX.OCX can also read TIFF 5.0 Class B, G, P, and R, LZW, CCIT Group3, Group 4,.NeXT, Thunderscan,and  Pixar compressed files with the addition of GVTIFF32.DLL

GVTIFF32.DLL should be placed in the WINDOWS\SYSTEM directory.


 GVBox: Requirements for Using GVBox

GVBOX.OCX must first be registered using REGSVR32.EXE or by browsing for it from VB32.EXE or other platform.

GVBOX.OCX also requires MFC40.DLL.


 GVBox Help